﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Husb.Framework
{
    interface IBusinessManager<TEntity>
        where TEntity : EntityBase, new()
    {
        IList<TEntity> FindAll(bool enableCache);
        IList<TEntity> Find(string where, string orderBy, bool enableCache);
        TEntity GetById(Guid id, bool enableCache);
        int GetCount(string where, bool hideDeleted);
        IList<TEntity> GetPaged(string where, bool hideDeleted, string sortExpression, int maximumRows, int startRowIndex);
        bool Insert(TEntity entity, bool removeCache, string[] cacheKey);
        bool Update(TEntity entity, bool removeCache, string[] cacheKey);
        bool Delete(Guid id, bool removeCache, string[] cacheKey);
    }
}
